//
//  ViewController.m
//  MoleBeats
//
//  Created by 瑞 曾 on 16/6/25.
//  Copyright (c) 2016年 瑞 曾. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@property (weak, nonatomic) IBOutlet UIImageView *top;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    [self creatBackGround];
    // Do any additional setup after loading the view, typically from a nib.
}
#pragma mark 创建背景
-(void)creatBackGround
{
    NSMutableArray * ar=[[NSMutableArray alloc]init];
    int i;
    for (i=1; i<5; i++) {
        UIImage * image=[UIImage imageNamed:[NSString stringWithFormat:@"GameBG0%d.png",i]];
        [ar addObject:image];
        UIImageView * imageView=[[UIImageView alloc]initWithImage:image];
        imageView.frame=CGRectMake(0, 0+(i-1)*self.view.frame.size.height/4, self.view.frame.size.width, self.view.frame.size.height/4);
        [self.view addSubview:imageView];
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
